package day6;

import java.io.FileReader;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileRead2 {
    public static void main(String[] args) {
        try {
            FileReader fr = new FileReader("F:/java76/yangshuo/名单.txt");
            char[] ar = new char[100];
            int len=0;
            while ((len=fr.read(ar)) != -1) {
                System.out.print(new String(ar,0,len));
            }
            fr.close();//这样不好
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
